package cn.ibatdream.spi_demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.util.ServiceLoader;

@SpringBootApplication
public class SpiDemoApplication {

    public static void main(String[] args) {
        ServiceLoader<SpiDemo> spiDemos = ServiceLoader.load(SpiDemo.class);
        spiDemos.forEach(data-> System.out.println(data.sayHello()));
        SpringApplication.run(SpiDemoApplication.class, args);
    }

}
